[ISSUE #XXXXX] Add SNI multi-domain certificate support for Proxy TLS#10295
Closed
qianye1001 wants to merge 1 commit intoapache:developfrom
Closed
[ISSUE #XXXXX] Add SNI multi-domain certificate support for Proxy TLS#10295qianye1001 wants to merge 1 commit intoapache:developfrom
qianye1001 wants to merge 1 commit intoapache:developfrom
Conversation
Introduce Server Name Indication (SNI) support to allow RocketMQ Proxy to serve multiple TLS domains (e.g. *.alibaba-inc.com, *.rocketmq.com) with independent certificates on the same port. Key changes: - New TlsDomainConfig POJO for per-domain cert/key configuration - New TlsSniManager for wildcard-aware SslContext management - Extended TlsCertificateManager for multi-domain file watching - ProxyAndTlsProtocolNegotiator uses SniHandler for SNI-aware TLS - NettyRemotingServer TlsModeHandler uses TlsContextProvider bridge - TlsContextProvider in remoting module for SNI context lookup - Backward compatible: single cert behavior unchanged when no tlsDomainConfigs is configured Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
*.alibaba-inc.com,*.rocketmq.com) to be served with independent certificates on the same portTlsDomainConfigPOJO for per-domain cert/key path configuration inProxyConfigTlsSniManagermanages multipleSslContextinstances with wildcard matching (*.domain.com) and independent hot-reloadProxyAndTlsProtocolNegotiator(gRPC) andNettyRemotingServer(Remoting) both useSniHandlerfor SNI-aware certificate selectionTlsCertificateManagerextended to watch multiple cert/key pairs independently per domaintlsDomainConfigsis configured, behavior is identical to the existing single-cert modelConfiguration
Files Changed
proxy/.../config/TlsDomainConfig.javaproxy/.../config/ProxyConfig.javatlsDomainConfigsmap field + getters/settersproxy/.../service/cert/TlsSniManager.javaproxy/.../service/cert/TlsCertificateManager.javaproxy/.../grpc/ProxyAndTlsProtocolNegotiator.javaSniHandler+TlsSniManagerfor gRPC SNIproxy/.../grpc/GrpcServer.javaproxy/.../remoting/MultiProtocolRemotingServer.javaTlsContextProviderwith SNI lookupproxy/.../ProxyStartup.javaTlsSniManagerbeforeTlsCertificateManagerremoting/.../netty/TlsContextProvider.javaremoting/.../netty/NettyRemotingServer.javaTlsModeHandlerusesSniHandlerviaTlsContextProviderWildcard Matching Rules
foo.rocketmq.commatches*.rocketmq.comrocketmq.commatches*.rocketmq.coma.b.rocketmq.com) does NOT match*.rocketmq.com→ defaultTest Plan
TlsSniManagerwildcard matching and fallbackTlsCertificateManagermulti-domain watchingopenssl s_client -servernameverificationtlsDomainConfigs→ single cert works as before🤖 Generated with Claude Code